run: all
	valgrind --leak-check=full --track-origins=yes ./a.out 2>&1 | tee run.log

all: main.o bank_transactor.o random_generator.o my_thread_class.o client.o bank.o
	g++ -Wall main.o bank_transactor.o random_generator.o my_thread_class.o client.o bank.o -pthread 

main.o: main.cc
	g++ -Wall -c main.cc

random_generator.o: random_generator.cc random_generator.h
	g++ -Wall -c random_generator.cc

bank_transactor.o: bank_transactor.cc bank_transactor.h
	g++ -Wall -c bank_transactor.cc

my_thread_class.o: my_thread_class.cc my_thread_class.h
	g++ -Wall -c my_thread_class.cc

client.o: client.cc client.h
	g++ -Wall -c client.cc

bank.o: bank.cc bank.h
	g++ -Wall -c bank.cc

clean:
	rm -f *.o *.out *.log
